<template>
  <div class="login-box">
    <PageLoginLogins v-if="types === -1" @changeType="changeType" @closeLogin="closeLogin" />
    <PageLoginRegister v-else :types="types" @changeType="changeType" @closeLogin="closeLogin" />
  </div>
</template>

<script lang="ts" setup>
const emit = defineEmits(["closeLogin"]);
let types = ref(-1); //-1 登录 1 忘记密码 2 注册
const changeType = (type: number) => {
  types.value = type;
};
const closeLogin = () => {
  emit("closeLogin");
};
</script>

<style lang="stylus" scoped>
.login-box{
  position fixed
  top:0;
  left:0;
  width:100%
  height:100vh
  min-width:1080px;
  background:rgba(0,0,0,0.5)
  z-index 99
}
</style>
